//
//  CategoryCellChildView.h
//  JiaoX
//
//  Created by 尹桥印 on 14/11/18.
//  Copyright (c) 2014年 北京娇羞科技有限公司. All rights reserved.
//  分类里面每一个小条目，包含一个图片，一个标题

#import <UIKit/UIKit.h>
#import "SubCategory.h"


#define SUBCATEGORY_COL 4 //列数
#define TITLE_FONT_SIZE 12 //标题字体大小
//当前view的高度
#define CATEGORY_CHILDVIEW_HEIGHT (JXScreenW-5*JXPublicInset)/SUBCATEGORY_COL

//定义一个协议
@protocol CategoryCellChildViewDelegate <NSObject>
@optional
- (void)subItemClickDelegate:(SubCategory *)sub;
@end




@interface CategoryCellChildView : UIView
//+(instancetype)initWithIconUrl:(NSString *)url title:(NSString *)title;
@property (nonatomic, weak) id<CategoryCellChildViewDelegate> itemClickDelegate;
+(instancetype)initWithIconSubCategory:(SubCategory *)sub;
-(void)setSub:(SubCategory *)sub;
@end
